package thread;

public class RunnableDemo {
    public static void main(String[] args){
        Thread run1 = new Thread(new Run1());
        Thread run2 = new Thread(new Run2());
          run1.start();
          run2.start();

    }
}
class Run1 implements Runnable{

    @Override
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println("1111");
        }
    }
}
class Run2 implements Runnable{

    @Override
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println("2222");
        }
    }
}